<template>
  <div class="cms-rotation" :class="`style_${type}`">
    <div
      v-if="type === 2"
      class="video-left w-[10px] h-[172px] bg-[#FFF4F0] rounded-tr-lg rounded-br-lg mt-[10px]"
    ></div>
    <div class="video">
      <div class="video_shadow_rotation video_shadow">
        <img :src="homeIcons.film" alt="" class="img-show" />
        <div class="label">视频</div>
        <div class="bottom-box">
          <span class="text-base text-[#fff] dome-text">视频简介</span>
          <div v-if="type !== 2" class="more">
            <div class="dot-first dome-text"></div>
            <div class="dot dome-text"></div>
            <div class="dot dome-text"></div>
            <div class="dot dome-text"></div>
            <div class="dot dome-text"></div>
          </div>
        </div>
      </div>
    </div>
    <div
      v-if="type === 2"
      class="video-right w-[10px] h-[172px] bg-[#FFF4F0] rounded-tl-lg rounded-bl-lg mt-[10px]"
    ></div>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import cmsRotationViewProps from './props'
import homeIcons from '../../assets'

export default defineComponent({
  props: cmsRotationViewProps,
  setup() {
    return {
      homeIcons
    }
  },
  components: {}
})
</script>
<style scoped lang="less">
.cms-rotation {
  width: 375px;
  padding: 8px 16px;
  background-color: #fff;

  .bottom-box {
    @apply flex w-full px-2;
    position: absolute;
    bottom: 10px;
  }
  .more {
    @apply flex absolute bottom-0 right-2;
  }
  .dot-first {
    width: 16px;
    height: 6px;
    background: #ffffff;
    border-radius: 6px;
  }
  .dot {
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
    margin-left: 8px;
  }
  &.style_1 {
    .video {
      width: 343px;
      height: 193px;
      border-radius: 8px;
      position: relative;
    }
    .video_shadow_rotation {
      width: 343px;
      height: 193px;
      border-radius: 8px;
    }
    .label {
      width: 40px;
      height: 20px;
      background: #ff613f;
      border-radius: 20px;
      color: #fff;
      line-height: 20px;
      font-size: 12px;
      text-align: center;
      position: absolute;
      left: 8px;
      bottom: 41px;
    }
  }
  &.style_2 {
    padding: 8px 0;
    @apply flex;
    .video {
      width: 343px;
      height: 193px;
      border-radius: 8px;
      position: relative;
      margin: 0 6px;
    }
    .video_shadow_rotation {
      width: 343px;
      height: 193px;
      border-radius: 8px;
    }
    .label {
      width: 40px;
      height: 20px;
      background: #ff613f;
      border-radius: 20px 0 0 20px;
      color: #fff;
      line-height: 20px;
      font-size: 12px;
      text-align: center;
      position: absolute;
      right: 0;
      top: 12px;
    }
    .video-left {
      width: 10px;
      height: 172px;
      border-radius: 0 8px 8px 0;
    }
    .video-right {
      width: 10px;
      height: 172px;
      border-radius: 8px 0 0 8px;
    }
  }
  &.style_3 {
    padding: 8px 0;
    .video {
      width: 375px;
      height: 211px;
      position: relative;
    }
    .video_shadow_rotation {
      width: 375px;
      height: 211px;
      &::after {
        @apply rounded-none;
      }
    }
    .label {
      width: 40px;
      height: 20px;
      background: #ff613f;
      border-radius: 4px;
      color: #fff;
      line-height: 20px;
      font-size: 12px;
      text-align: center;
      position: absolute;
      left: 16px;
      top: 16px;
    }
  }
}
</style>
